<template>
  <div class="cn_notify">
    <div class="content">
      <i class="el-icon-message-solid"></i>
      The system version has been updated, please refresh~
    </div>
    <div class="footer">
      <el-row class="btnBox">
        <el-button type="primary" @click="onSubmit">Confirm refresh</el-button>
        <el-button @click="cancle">I got it</el-button>
      </el-row>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    msg: {
      type: String,
      default: "",
    },
    version: {
      type: String,
      default: "",
    },
  },
  data() {
    return {};
  },
  created() {},
  methods: {
    onSubmit() {
      // 存入版本version
      sessionStorage.setItem("version", this.version);
      // 刷新
      location.reload();
    },
    cancle() {
      this.$parent.close();
    },
  },
};
</script>
<style lang="scss" scoped>
.cn_notify {
  .content {
    padding: 20px 0;
  }
  .footer {
    display: flex;
    justify-content: center;
  }
}
</style>
<style lang="scss">
.versionNotifyStyle {
  .el-notification__content {
    width: 280px !important;
  }
}
</style>
